package com.atguigu.xiaozhi.assistant;


import com.atguigu.xiaozhi.bean.ChatForm;
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import org.springframework.beans.factory.annotation.Autowired;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
        chatModel = "qwenChatModel",
        chatMemoryProvider = "chatMemoryProvider",
        // 配置tools
        tools = "calculatorTools"
)

/**
 * 分离聊天记录
 * @param memoryId 聊天记录的id
 * @param userMessage 用户输入消息
 */

public interface SeparateChatAssistant {

    @SystemMessage(fromResource = "xiaozhi-prompt-template.txt")
    String chat(@MemoryId int memoryId, @UserMessage String userMessage);
}
